/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const customerRouter = {
  path: '/customer',
  component: Layout,
  name: '客户',
  meta: {
    title: '客户',
    subtitle:'客户',
    icon: 'merchant'
  },
  children: [
    // 模拟三级路由
    {
      path: '',
      component: Layout,
      name: '客户设置',
      meta: { title: '客户设置', subtitle: '日常', icon: 'menu-sales'},
      childrens: [
        {
          path: '/memberCategory/list',
          meta: {title: '客户分类',subtitle:'分类', icon: 'menu_vip', permissions: ['memberCategory.query']}
        },
        {
          path: '/vip/list',
          meta: {title: '客户等级',subtitle:'等级', icon: 'menu_vip', permissions: ['vip.query']}
        },
        {
          path: '/distribution/list',
          meta: {title: '分销设置', subtitle:'分销',icon: 'menu_distribution', permissions: ['distribution.query'] }
        },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '客户管理',
      meta: { title: '客户管理', subtitle: '客户', icon: 'menu-sales'},
      childrens: [

        {
          path: '/member/list',
          meta: {title: '客户档案', subtitle:'档案',icon: 'menu_member', permissions: ['member.query'],color:'true'}
        },
        {
          path: '/company/list',
          meta: {title: '福利卡充值',subtitle:'企业', icon: 'menu_member', permissions: ['companyList.query']}
        },
        {
          path: '/agentrecharge/list',
          meta: {title: '代理商充值',subtitle:'企业', icon: 'menu_member', permissions: ['companyList.query']}
        }
      ]
    },
    ,{
      path: '',
      component: Layout,
      name: '供应商',
      meta: { title: '供应商', subtitle: '供应商', icon: 'menu_order'},
      childrens: [
        {
          path: '/supplierCategory/list',
          meta: {title: '供应商分类', subtitle:'分类',icon: 'menu_supplier', permissions: ['supplierCategory.query']}
        },
        {
          path: '/supplier/list',
          meta: {title: '供应商档案', subtitle:'档案',icon: 'menu_supplier', permissions: ['supplier.query'],color:'true'}
        }
      ]
    },
    {
      path: '',
      component: Layout,
      name: '客户查询',
      meta: { title: '客户查询', subtitle: '查询', icon: 'menu-sales'},
      childrens: [
        {
          path: '/member/loss',
          meta: {title: '流失客户查询',subtitle:'流失', icon: 'menu_member', permissions: ['member.query']}
        },
        {
          path: '/waterTictetReport/list',
          meta: { title: '客户水票查询',subtitle:'水票', icon: 'menu_report',permissions:['waterTictetReport.query']}
        },
        {
          path: '/virtualPledgeReport/list',
          meta: { title: '客户押金查询',subtitle:'押金', icon: 'menu_report',permissions:['virtualPledgeReport.query']}
        },
        {
          path: '/giftCard/list',
          meta: { title: '礼卡状态查询', subtitle:'礼品卡', icon: 'menu_material', permissions: ['giftCard.query'] }
        },
        {
          path: '/report/point/detailed',
          meta: { title: '奖金记录查询', subtitle:'佣金', icon: 'menu_material', permissions: ['member.query'] }
        }
      ]
    },
    // 注册路由
    {
      path: '/member/welfareBill',
      component: () => import('@/views/member/welfareBill'),
      name: 'member-welfareBill',
      meta: {title: '查看账单',subtitle:'分类', icon: 'menu_vip'},
      hidden: true
    },
    {
      path: '/memberCategory/list',
      component: () => import('@/views/memberCategory/list'),
      name: 'memberCategory-list',
      meta: {title: '客户分类',subtitle:'分类', icon: 'menu_vip', permissions: ['memberCategory.query']},
      hidden: true
    },
    {
      path: '/memberCategory/add',
      component: () => import('@/views/memberCategory/add'),
      name: 'memberCategory-add',
      meta: {title: '新增客户分类',subtitle:'新增', icon: 'menu_vip'},
      hidden: true
    },
    {
      path: '/memberCategory/edit',
      component: () => import('@/views/memberCategory/edit'),
      name: 'memberCategory-edit',
      meta: {title: '修改客户分类',subtitle:'修改', icon: 'menu_vip'},
      hidden: true
    },
    {
      path: '/vip/list',
      component: () => import('@/views/vip/list'),
      name: 'vip-list',
      meta: {title: '客户等级',subtitle:'等级', icon: 'menu_vip', permissions: ['vip.query']},
      hidden: true
    },
    {
      path: '/distribution/list',
      component: () => import('@/views/distribution/list'),
      name: 'distribution-list',
      meta: { title: '分销设置', subtitle:'分销',icon: 'menu_distribution', permissions: ['distribution.query'] },
      hidden: true
    },
    {
      path: '/member/list',
      component: () => import('@/views/member/list'),
      name: 'member-list',
      meta: {title: '客户档案', subtitle:'档案',icon: 'menu_member', permissions: ['member.query']},
      hidden: true
    },
    {
      path: '/member/add',
      component: () => import('@/views/member/add'),
      name: 'member-add',
      meta: {title: '新增客户', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/member/edit',
      component: () => import('@/views/member/edit'),
      name: 'member-edit',
      meta: {title: '修改客户', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/member/detail',
      component: () => import('@/views/member/detail'),
      name: 'member-detail',
      meta: { title: '客户详情', icon: 'menu_member' },
      hidden: true
    },
    {
      path: '/member/loss',
      component: () => import('@/views/member/loss'),
      name: 'member-loss',
      meta: { title: '流失客户查询', icon: 'menu_member' },
      hidden: true
    },
    {
      path: '/agentrecharge/list',
      component: () => import('@/views/agentrecharge/list'),
      name: 'agentrecharge-list',
      meta: {title: '代理商充值',subtitle:'企业', icon: 'menu_member', permissions: ['companyList.query']},
      hidden: true
    },
    {
      path: '/agentrecharge/view',
      component: () => import('@/views/agentrecharge/view'),
      name: 'agentrecharge-view',
      meta: {title: '代理商充值详情',subtitle:'企业', icon: 'menu_member', permissions: ['companyList.query']},
      hidden: true
    },
    {
      path: '/company/list',
      component: () => import('@/views/company/list'),
      name: 'company-list',
      meta: {title: '企业福利卡',subtitle:'企业', icon: 'menu_member', permissions: ['companyList.query']},
      hidden: true
    },
    {
      path: '/company/add',
      component: () => import('@/views/company/add'),
      name: 'company-add',
      meta: {title: '新增企业客户', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/company/edit',
      component: () => import('@/views/company/edit'),
      name: 'company-edit',
      meta: {title: '编辑企业客户', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/company/employeeConsumption',
      component: () => import('@/views/company/employeeConsumption'),
      name: 'emplyee_consumption',
      meta: {title: '员工消费详情', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/company/recharge',
      component: () => import('@/views/company/recharge'),
      name: 'company-recharge',
      meta: {title: '企业充值', icon:'menu_member'},
      hidden: true
    },
    {
      path: '/company/rechargeList',
      component: () => import('@/views/company/rechargeList'),
      name: 'company-rechargeList',
      meta: {title: '企业充值明细', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/company/employeeList',
      component: () => import('@/views/company/employeeList'),
      name: 'employee-list',
      meta: {title: '集团客户', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/company/addCustomers',
      component: () => import('@/views/company/addCustomers'),
      name: 'company-add',
      meta: {title: '新增企业客户', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/company/detaiCustomers',
      component: () => import('@/views/company/detaiCustomers'),
      name: 'company-detail',
      meta: {title: '企业客户详情', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/company/editCustomers',
      component: () => import('@/views/company/editCustomers'),
      name: 'company-detail',
      meta: {title: '编辑企业客户', icon: 'menu_member'},
      hidden: true
    },
    {
      path: '/supplier/list',
      component: () => import('@/views/supplier/list'),
      name: 'supplier-list',
      meta: {title: '供应商档案', subtitle:'档案',icon: 'menu_supplier', permissions: ['supplier.query']},
      hidden: true
    },
    {
      path: '/supplier/add',
      component: () => import('@/views/supplier/add'),
      name: 'supplier-add',
      meta: {title: '新增供应商', icon: 'menu_supplier'},
      hidden: true
    },
    {
      path: '/supplier/edit',
      component: () => import('@/views/supplier/edit'),
      name: 'supplier-edit',
      meta: {title: '修改供应商', icon: 'menu_supplier'},
      hidden: true
    },
    {
      path: '/supplierCategory/list',
      component: () => import('@/views/supplierCategory/list'),
      name: 'supplierCategory-list',
      meta: {title: '供应商档案分类', subtitle:'档案',icon: 'menu_supplier', permissions: ['supplierCategory.query']},
      hidden: true
    },
    {
      path: '/supplierCategory/add',
      component: () => import('@/views/supplierCategory/add'),
      name: 'supplierCategory-add',
      meta: {title: '新增供应商分类', icon: 'menu_supplier'},
      hidden: true
    },
    {
      path: '/supplierCategory/edit',
      component: () => import('@/views/supplierCategory/edit'),
      name: 'supplierCategory-edit',
      meta: {title: '修改供应商分类', icon: 'menu_supplier'},
      hidden: true
    },
    {
      path: '/waterTictetReport/list',
      component: () => import('@/views/waterTictetReport/list'),
      name: 'waterTictetReport-list',
      meta: { title: '客户水票汇总表',subtitle:'水票', icon: 'menu_report'},
      hidden: true
    },
    {
      path: '/waterTictetReport/details',
      component: () => import('@/views/waterTictetReport/details'),
      name: 'waterTictetReport-details',
      meta: { title: '客户水票明细表',subtitle:'水票', icon: 'menu_report'},
      hidden: true
    },
    {
      path: '/virtualPledgeReport/list',
      component: () => import('@/views/virtualPledgeReport/list'),
      name: 'virtualPledgeReport-list',
      meta: { title: '客户押金汇总表',subtitle:'押金', icon: 'menu_report'},
      hidden: true
    },
    {
      path: '/virtualPledgeReport/details',
      component: () => import('@/views/virtualPledgeReport/details'),
      name: 'virtualPledgeReport-details',
      meta: { title: '客户押金明细',subtitle:'押金', icon: 'menu_report'},
      hidden: true
    },
    {
      path: '/giftCard/list',
      component: () => import('@/views/giftCard/list'),
      name: 'giftCard-list',
      meta: { title: '礼品卡查询', subtitle:'礼品卡',icon: 'menu_material'},
      hidden: true
    },
    {
      path: '/report/point/detailed',
      component: () => import('@/views/report/point/detailed'),
      name: 'report-point-detailed',
      meta: { title: '佣金明细查询', subtitle:'佣金明细查询',icon: 'menu_material'},
      hidden: true
    },
  ]
}

export default customerRouter
